//
//  Routable.swift
//  Route
//
//  Created by 蒋晨成 on 2021/12/15.
//

import Base
import Foundation
import Standard
import UIKit

public protocol Routable: ViewController {
    static func initialize(values: [String: Any]) -> ViewController?
    static var routePattern: String { get }
    static var pushAnimated: Bool { get }
    static var presentAnimated: Bool { get }
    static var description: String { get }
}

public extension Routable {
    static var routeName: String {
        typeName.removingSuffix(ViewController.typeName)
    }

    static var routePattern: String { routeName }
    static var pushAnimated: Bool { true }
    static var presentAnimated: Bool { true }
    static var description: String { "missing description" }
}
